package com.example.printer2;

import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.DefaultItemAnimator;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import com.example.printer2.adapter.FileListAdapter;
import com.example.printer2.adapter.RecordAdapter;
import com.example.printer2.po.MyFile;
import com.example.printer2.po.My_List;
import com.jaeger.library.StatusBarUtil;

public class RecordActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_record2);
        StatusBarUtil.setColor(this,getResources().getColor(R.color.yellow),0);
        init();
    }
    RecyclerView recyclerView;
    RecordAdapter adapter;
    public void init()
    {
        recyclerView=findViewById(R.id.RecordList);
        recyclerView.setLayoutManager(new LinearLayoutManager(this));
        recyclerView.setItemAnimator(new DefaultItemAnimator());
        adapter=new RecordAdapter(My_List.RecordList,this);
        recyclerView.setAdapter(adapter);
    }

    public void toPrinter(View view)
    {
        Intent intent=new Intent(this, PrinterActivity.class);
        startActivity(intent);
        this.overridePendingTransition(0, 0);
    }

    public void toMine(View view)
    {
        Intent intent=new Intent(this,MainActivity.class);
        startActivity(intent);
        this.overridePendingTransition(0, 0);
    }
}